<!DOCTYPE html>
<html class="bg-white">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>查看文件表</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}">
</head>

<body>
<form id="sysFileForm" lay-filter="sysFileForm" class="layui-form model-form" style="text-align: center">
    <input name="id" type="hidden"/>
    <div class="layui-form-item">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-block">
            <input disabled name="createDate" id="createDate" placeholder="请输入创建时间" type="text" class="layui-input"
                   lay-verify="required" required/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">文件名</label>
        <div class="layui-input-block">
            <input disabled name="fileName" id="fileName" placeholder="请输入文件名" type="text" class="layui-input"
                   lay-verify="required" required/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">文件描述</label>
        <div class="layui-input-block">
            <input disabled name="fileDesc" id="fileDesc" placeholder="请输入文件描述" type="text" class="layui-input"
                   lay-verify="required" required/>
        </div>
    </div>
    <div class="layui-form-item" id="showImg">
        <label class="layui-form-label">照片</label>
        <div class="layui-input-block">
            <img style="width: 200px" id="imgTest" src="">
        </div>
    </div>
<!--    <div class="layui-form-item text-right">-->
<!--        <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">关闭</button>-->
<!--    </div>-->
</form>

<!-- js部分 -->
<script type="text/javascript" th:src="@{/layui/layui.all.js}"></script>
<script type="text/javascript" th:src="@{/js/jquery-3.2.1.min.js}"></script>
<script th:inline="javascript">
    layui.use(['layer', 'form'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var sss = ${sysFile};
        console.log(sss)
        // 回显数据
        var sysFile = [[${sysFile}]];
        if (sysFile) {
            console.log(sysFile)
            form.val('sysFileForm', sysFile);
            $('#imgTest').attr("src","/PATH/"+sysFile.fileName)
        }
    });
</script>

</body>
</html>